<template>
  <div class="seller">
    <top :seller="seller"></top>
    <keep-alive><router-view></router-view></keep-alive>
    <shop-cart></shop-cart>
  </div>
</template>
<script>
import Top from './top/top'
import ShopCart from './shopCart/shopCart'
import {mapGetters} from 'vuex'
export default {
  data () {
    return {
      showCart: true
    }
  },
  computed: {
    ...mapGetters([
      'seller'
    ])
  },
  mounted () {
    console.log('mounted.')
    this.detail()
  },
  created () {
    console.log('created.')
  },
  activated () {
    console.log('activated.')
    this.detail()
  },
  components: {
    Top,
    ShopCart
  },
  methods: {
    detail () {
      this.$router.replace(`/seller/goodList`)
    }
  }
}
</script>
<style lang="less" scoped>
.seller {
  position:absolute;
  overflow: hidden;
  z-index: 99;
  height: 100%;
  width:100%;
  background-color: #fff;
  top:0;
  left:0;
}
</style>
